<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>fmt:setTimeZone设置时区</title>
</head>
<body>
	<div style="margin: auto; width: 80%">
		<h2>fmt:setTimeZone设置时区</h2>
		<c:set var="now" value="<%=new java.util.Date()%>" />
		<p>
			在当前时区的日期:
			<fmt:formatDate value="${now}" type="both" timeStyle="long"
				dateStyle="long" />
		</p>
		<p>修改时区为： GMT-8</p>
		<fmt:setTimeZone value="GMT-8" />
		<p>
			在修改后的时区日期:
			<fmt:formatDate value="${now}" type="both" timeStyle="long"
				dateStyle="long" />
		</p>
	</div>
</body>
</html>